package com.ys.otms.utils;

import com.ys.otms.dto.ParamDto;

/**
 * Created by Administrator on 2018/9/17.
 */
public class PageUtil {

    public static void setPage(int page, int limit, ParamDto param){
        if(page<1){
            page =1;
        }
        if (limit<1){
            limit=10;
        }
        page= (page-1)*limit;
        param.setStart(page);
        param.setSize(limit);
    }
}
